package com.jastar.android.game.richman.logic.card;

import com.jastar.android.game.richman.GameActivity;
import com.jastar.android.game.richman.logic.bean.Cell;
import com.jastar.android.game.richman.logic.bean.Player;
import com.jastar.android.game.richman.logic.handler.BaseCallback;
import com.jastar.android.util.Alert;

public class StepCard extends Card {

    private static final String[] OPTIONS = {"1", "2", "3", "4", "5", "6"};

    public StepCard(String message, int weight, int price) {
        super(message, weight, price);
    }

    public void use(GameActivity activity, Cell cell, Player player, BaseCallback callback) {
        Alert.select(activity, player.getIcon(), "请选择点数：", (d, w) -> {
            player.setNextRoll(Integer.parseInt(OPTIONS[w]));
            callback.onResult();
        }, OPTIONS);
    }

}
